package com.wasion.pwportable.protocol.analyzer.indicator;

import com.wasion.pwportable.protocol.analyzer.AbstractAnalyzer;

/**
 * 
* @ClassName: ShortFault_RD_Analyzer 
* @Description: 37. 短路
* @author 高意 
* @date 2014-9-10 下午4:59:04 
*
 */
public class ShortFault_RD_Analyzer extends AbstractAnalyzer {

	@Override
	public void dataAnalysis(String ackBS) {

		String data = ackBS.substring(DATABITSTART, DATABITSTART + 20);

		String preCurrent = data.substring(0, 4);
		String faultCurrent = data.substring(4, 8);
		String duration = data.substring(8, 12);

		String time = data.substring(12, 20);

		result.setPreCurrent(getCurrentPositive(preCurrent));
		result.setFaultCurrent(getCurrentPositive(faultCurrent));
		result.setDuration(Integer.parseInt(duration, 16));
		result.setOccurTime(getIndicatorDate(time));
	}
}
